package com.sky.mapper.admin;

import com.sky.pojo.DishFlavor;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * @Description DishFlavorsMapper
 * @Author weibaoping
 * @Date 2025-08-14 11:02 AM
 */
@Mapper
public interface DishFlavorsMapper {

    void saveWithFlavors(List<DishFlavor> flavors);

    @Delete("delete from dish_flavor where dish_id = #{id}")
    void deleteByDishId(Long id);

    @Select("select * from dish_flavor where dish_id = #{id}")
    List<DishFlavor> getById(Long id);


    List<DishFlavor> getByDishIds(List<Long> dishIds);

}
